//
//  LKChooseProductDetailCell.m
//  YLHelper
//
//  Created by she1323 on 2018/5/3.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import "LKChooseProductDetailCell.h"

@interface LKChooseProductDetailCell()
@property (weak, nonatomic) IBOutlet UILabel *moneyLabel;

@property (weak, nonatomic) IBOutlet UILabel *termlabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;

@property (weak, nonatomic) IBOutlet UILabel *productNameLabel;

@property (weak, nonatomic) IBOutlet UILabel *productTypeLabel;
@end


@implementation LKChooseProductDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setModel:(LKProductModel *)model{
    _model = model;

//    self.moneyLabel.text = [NSString stringWithFormat:@"%@%@",];
}
-(void)setAppointmodel:(LKProductModel *)appointmodel{
    _appointmodel = appointmodel;
    self.termlabel.text = [NSString stringWithFormat:@"%@%@",_appointmodel.productTerm,@"(月)"];
    self.moneyLabel.text = _appointmodel.annualizedYield;
    self.statusLabel.text = [self backTextAccroingType:[_appointmodel.payCategory integerValue]];
    self.productTypeLabel.text = [NSString backProductTypeAccordingStatusType:[_appointmodel.productCategory integerValue]];
    
    self.productNameLabel.text = [NSString stringWithFormat:@"%@",_appointmodel.productName];
}
/**
 兑付方式
 */
-(NSString *)backTextAccroingType:(NSInteger)type{
    if (type == 0) {
        return @"到期分配";
    }else if (type == 1){
        return @"按月分配";
    }
    return @"半年分配";
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
